package com.patterns.decorator.commonDecorator;

/**
 * Created by Xiao Yiyun on 2017/5/19.
 */
public class ConcreteDecorator extends Decorator {
    //定义被修饰者
    public ConcreteDecorator(Component component) {
        super(component);
    }
    //定义自己的修饰方法
    private void method() {
        System.out.println("method");
    }
    //重写父类的operation方法
    public void operate() {
        this.method();
        super.operate();
    }
}
